<?php

use Illuminate\Http\Request;

/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/
// 微信退款回调
Route::any('/v1/shop_api/wx/refund', 'v1\OrderController@refund');
Route::group(['prefix' => 'v1/admin_api','middleware'=>'admin_api_auth'], function ($router) {
/***********************************商品分类***************************************/	
	//列表数据
	Route::get('shop/product_type/index', 'v1\ProductTypeController@index');
	//添加
	Route::post('shop/product_type/store', 'v1\ProductTypeController@store');
	//添加子级
	Route::post('shop/product_type/create_sublevel', 'v1\ProductTypeController@create_sublevel');
	//编辑页面
	Route::get('shop/product_type/edit', 'v1\ProductTypeController@edit');
	//编辑提交
	Route::put('shop/product_type/update', 'v1\ProductTypeController@update');
	//状态
	Route::put('shop/product_type/status', 'v1\ProductTypeController@status');
	//排序
	Route::put('shop/product_type/sorts', 'v1\ProductTypeController@sorts');
	
	
	
	
/***********************************商品属性***************************************/	
	//列表数据
	Route::get('shop/product_attrbute_key/index', 'v1\ProductAttrbuteKeyController@index');
	//获取商品分类数据
	Route::get('shop/product_attrbute_key/product_type_list', 'v1\ProductAttrbuteKeyController@product_type_list');
	//添加
	Route::post('shop/product_attrbute_key/store', 'v1\ProductAttrbuteKeyController@store');
	//编辑页面
	Route::get('shop/product_attrbute_key/edit', 'v1\ProductAttrbuteKeyController@edit');
	//编辑提交
	Route::put('shop/product_attrbute_key/update', 'v1\ProductAttrbuteKeyController@update');
	//状态
	Route::put('shop/product_attrbute_key/status', 'v1\ProductAttrbuteKeyController@status');
	//排序
	Route::put('shop/product_attrbute_key/sorts', 'v1\ProductAttrbuteKeyController@sorts');	
	//删除
	Route::delete('shop/product_attrbute_key/destroy', 'v1\ProductAttrbuteKeyController@destroy');
/***********************************商品属性值***************************************/	
	//列表数据
	Route::get('shop/product_attrbute_value/index', 'v1\ProductAttrbuteValueController@index');
	//获取商品属性数据
	Route::get('shop/product_attrbute_value/attrbute_key_list', 'v1\ProductAttrbuteValueController@attrbute_key_list');
	//添加
	Route::post('shop/product_attrbute_value/store', 'v1\ProductAttrbuteValueController@store');
	//编辑页面
	Route::get('shop/product_attrbute_value/edit', 'v1\ProductAttrbuteValueController@edit');
	//编辑提交
	Route::put('shop/product_attrbute_value/update', 'v1\ProductAttrbuteValueController@update');
	//状态
	Route::put('shop/product_attrbute_value/status', 'v1\ProductAttrbuteValueController@status');
	//排序
	Route::put('shop/product_attrbute_value/sorts', 'v1\ProductAttrbuteValueController@sorts');	
	//删除
	Route::delete('shop/product_attrbute_value/destroy', 'v1\ProductAttrbuteValueController@destroy');
/***********************************商品列表***************************************/	
	//商品列表
	Route::get('shop/product/index', 'v1\ProductController@index');
	//商品分类
	Route::get('shop/product/product_type_list', 'v1\ProductController@product_type_list');
	//获取属性
	Route::get('shop/product/product_attrbute_key_list', 'v1\ProductController@product_attrbute_key_list');
	//添加
	Route::post('shop/product/store', 'v1\ProductController@store');
	//编辑页面
	Route::get('shop/product/edit', 'v1\ProductController@edit');
	//编辑提交
	Route::put('shop/product/update', 'v1\ProductController@update');
	//上架下架
	Route::put('shop/product/status', 'v1\ProductController@status');
	//是否精品推荐
	Route::put('shop/product/recommend_status', 'v1\ProductController@recommend_status');
	//是否热卖单品
	Route::put('shop/product/best_status', 'v1\ProductController@best_status');
	//排序
	Route::put('shop/product/sorts', 'v1\ProductController@sorts');	
	//删除
	Route::delete('shop/product/destroy', 'v1\ProductController@destroy');	
	//评论列表
	Route::get('shop/product/evaluate_list', 'v1\ProductController@evaluate_list');
	//评论状态
	Route::put('shop/product/evaluate_status', 'v1\ProductController@evaluate_status');	
/***********************************会员管理***************************************/	
	//用户列表
	Route::get('shop/user/index', 'v1\UserController@index');
/***********************************图片管理***************************************/	
	//轮播图列表
	Route::get('shop/picture/index', 'v1\PictureController@index');
	//获取商品属性数据
	Route::get('shop/picture/attrbute_key_list', 'v1\PictureController@attrbute_key_list');
	//添加
	Route::post('shop/picture/store', 'v1\PictureController@store');
	//编辑页面
	Route::get('shop/picture/edit', 'v1\PictureController@edit');
	//编辑提交
	Route::put('shop/picture/update', 'v1\PictureController@update');
	//状态
	Route::put('shop/picture/status', 'v1\PictureController@status');
	//是否往期
	Route::put('shop/picture/open', 'v1\PictureController@open'); 
	//排序
	Route::put('shop/picture/sorts', 'v1\PictureController@sorts');	
	//删除
	Route::delete('shop/picture/destroy', 'v1\PictureController@destroy');	
/***********************************订单管理***************************************/	
	//订单列表
	Route::get('shop/order/index', 'v1\OrderController@index');
	//编辑地址页面
	Route::get('shop/order/edit_address', 'v1\OrderController@edit_address');
	//编辑地址提交
	Route::put('shop/order/edit_update', 'v1\OrderController@edit_update');
	//发货
	Route::put('shop/order/status', 'v1\OrderController@status');
	//订单详情
	Route::get('shop/order/order_detail', 'v1\OrderController@order_detail');
	//申诉记录
	Route::get('shop/order/order_complain_list', 'v1\OrderController@order_complain_list');
	//通过/驳回
	Route::put('shop/order/order_complain', 'v1\OrderController@order_complain');
	//退款页面
	Route::get('shop/order/order_refund_info', 'v1\OrderController@order_refund_info');
	//退款数据处理
	Route::put('shop/order/order_refund', 'v1\OrderController@order_refund');
	//已发货订单列表
	Route::get('shop/shipped_order/index', 'v1\ShippedOrderController@index');
/***********************************咨询管理***************************************/	
	//咨询列表
	Route::get('shop/consult/index', 'v1\ConsultController@index');
	//添加
	Route::post('shop/consult/store', 'v1\ConsultController@store');
	//编辑页面
	Route::get('shop/consult/edit', 'v1\ConsultController@edit');
	//编辑提交
	Route::put('shop/consult/update', 'v1\ConsultController@update');
	//状态
	Route::put('shop/consult/status', 'v1\ConsultController@status');
	//排序
	Route::put('shop/consult/sorts', 'v1\ConsultController@sorts');	
	//删除
	Route::delete('shop/consult/destroy', 'v1\ConsultController@destroy');
	
	
	//咨询评价列表
	Route::get('shop/consult/evaluate_index', 'v1\ConsultController@evaluate_index');
	//咨询评价状态
	Route::put('shop/consult/evaluate_status', 'v1\ConsultController@evaluate_status');
	//咨询评价删除
	Route::delete('shop/consult/evaluate_destroy', 'v1\ConsultController@evaluate_destroy');
	
});